extends ../components/base
block title
    title 用户管理
block common_header
    include ../components/header
    +commonheader(0)
block style
    link(rel='stylesheet', href=__CSS_PATH__ + '/news.css')
    style.
        #main-wrapper {
            margin-top: 10px;
        }
block aside_content
    include ../components/mixin
    -var routerObj = [{link:'/',text:'应用',icon:'icon-app'},{link:'/message',text:'消息',icon:'icon-message2'},{link:'/setting/user_manage',text:'平台管理',icon:'icon-setting'}]
    +asideNav(routerObj,2)
block main_content
    include ../components/mixin
    -var menuObj = [{link:'/setting/organization_manage',text:'平台自身管理'},{link:'/setting/contact_manage',text:'对接系统管理'},{link:'/setting/app_manage',text:'第三方应用系统管理'}]
    +menuLink(menuObj,0)
    -var navObj = [{link:'/setting/organization_manage',text:'组织机构管理'},{link:'#',text:'用户管理'},{link:'/setting/role_manage',text:'角色权限管理'},{link:'/setting/region_manage',text:'行政区划分'},{link:'/setting/log_manage',text:'日志管理'}]
    +menuNav(navObj,1)
    .condition
        .inline-group
            label(for='name') 用户名称:
            input#name(type='text')
        .inline-group
            label(for='roleId') 角色名称:
            select#roleId
                option(value="") 请选择
                if(roleList.length)
                    each role in roleList
                        option(value=role.id) #{role.name}
        .inline-group
            button.btn.btn-default.btn-sm(type='button' style='margin-left:20px' onclick="searchSomething();") 检索
            button.btn.btn-default.btn-sm(type='button' style='margin-left:20px' onclick='window.location.href="/setting/user_edit"') 新建
            button.btn.btn-default.btn-sm(type='button' style='margin-left:20px' onclick='deleteSomething("setting","user");') 删除
    #inner-wrapper
        .content-list.section-block
            table.table.table-bordered
                thead
                    tr
                        td
                            input(type='checkbox')
                        td  用户名
                        td  登录账号
                        td  用户角色
                        td  所属部门
                        td  创建时间
                        td  操作
                tbody
                    if(users.length)
                        each user in users
                            tr
                                td
                                    input(type='checkbox' data-id=user.id)
                                td.link  #{user.name}
                                td  #{user.loginAccount}
                                td  #{user.roleNames}
                                td  #{user.deptNames}
                                td  #{user.createTime}
                                td
                                    a.link(href='/setting/user_edit?edit=true&userId='+user.id) 编辑
        if(rowsCount > 10)
            #pageInfo.pager(style="text-align:center" data-count=rowsCount)
block script
    script(type="text/javascript").
        initSearchInfo();